package ru.aslanov.schedule.model;

import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.NotPersistent;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;

/**
 * Created by IntelliJ IDEA.
 * Created: Jul 9, 2010 7:26:32 PM
 *
 * @author Sergey Aslanov
 */
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class GoogleCalendarSyncCalendar extends Entity {
    @NotPersistent
    private UnownReference<Schedule> schedule = new UnownReference<Schedule>(Schedule.class);
    @NotPersistent
    private UnownReference<GCalendar> gCalendar = new UnownReference<GCalendar>(GCalendar.class);

    @Persistent
    public String getScheduleKey() {
        return schedule.getEncodedKey();
    }

    public void setScheduleKey(String scheduleKey) {
        schedule.setEncodedKey(scheduleKey);
    }

    @Persistent
    public String getGCalendarKey() {
        return gCalendar.getEncodedKey();
    }

    public void setGCalendarKey(String gCalendarKey) {
        gCalendar.setEncodedKey(gCalendarKey);
    }

    public UnownReference<Schedule> getSchedule() {
        return schedule;
    }

    public UnownReference<GCalendar> getGCalendar() {
        return gCalendar;
    }
}
